package cn.com.git.admin.service.dto;

import cn.com.git.common.base.BaseDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
/**
  * SysResource save dto
  * @author zhangzhenfu
  * @Description
  * @date 2020/5/18
*/
@Data
public class SysResourceSaveDTO extends BaseDTO {

    @ApiModelProperty(value = "主表单")
    @NotNull(message = "表单不能为空")
    private SysResourceSaveDTO.SysResource m;

    @Data
    public static class SysResource {
        @ApiModelProperty(value = "主键")
        private Integer id;

        @ApiModelProperty(value = "资源名称")
        @NotNull(message = "资源名称不能为空")
        private String name;

        @ApiModelProperty(value = "路径")
        private String link;

        @ApiModelProperty(value = "显示顺序")
        private Integer priority;

        @ApiModelProperty(value = "资源类型")
        @NotNull(message = "资源类型不能为空")
        private Integer type;

        @ApiModelProperty(value = "权限字符串")
        @NotNull(message = "权限字符串不能为空")
        private String permission;

        @ApiModelProperty(value = "图标")
        private String icon;

        @ApiModelProperty(value = "层级")
        @NotNull(message = "层级不能为空")
        private Integer level;

        @ApiModelProperty(value = "父编号")
        private Integer pid;

        @ApiModelProperty(value = "0停用；1启用；")
        @NotNull(message = "状态不能为空")
        private Integer state;
    }

}